﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master" AutoEventWireup="true" CodeBehind="AdminUserDetail.aspx.cs" Inherits="FortuneHeaven.Admin.Pages.Auth.AdminUserDetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="../../Content/CSS/newsdetail.css" />
    <script type="text/javascript" src="../../Common/Js/AreaSelect.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
        if (document.getElementById('slProvince')) {
            BindProvince('<%= Province%>', 'slProvince', '<%= City%>', 'slCity'); //只初始化省份
        }
    });
</script>
    <script>
        function removeFunc(id) {
            var name = "#<%= hidSelectRoles.ClientID %>";
            if ($(name).val() != "") {

                var c = $(name).val();
                var content = c.split(",");
                for (var index = 0; index < content.length; index++) {
                    if (content[index] == id) {
                        content[index] = "";
                    }
                }

                var total = "";
                for (index = 0; index < content.length; index++) {
                    if (content[index] != "") {
                        if (total != "") {
                            total = total + "," + content[index];
                        }
                        else {
                            total = total + content[index];
                        }
                    }
                }
                $(name).val(total);
            }
        }
        function addFunc(id) {
            var name = "#<%= hidSelectRoles.ClientID %>";
            if ($(name).val() == "") {
                $(name).val(id);
            }
            else {
                $(name).val($(name).val() + "," + id);
            }
        }
        $("document").ready(function () {
            $("#removeRole").click(function () {
                var rols = $("#slRoles").find("[selected]")
                if (rols) {
                    $("#slNoRoles").append(rols.remove());
                    removeFunc(rols.val());
                }

            });
            $("#addRole").click(function () {
                var rols = $("#slNoRoles").find("[selected]")
                if (rols) {
                    $("#slRoles").append(rols.remove());
                    addFunc(rols.val());
                }

            });
        });
        
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellspacing="1" cellpadding="0" border="0" width="960" class="askfra">
        <tbody>
            <tr>
                <th class="atit" colspan="2">
                    <%= CheckStatus() %>
                </th>
            </tr>
            <tr> 
                <td class="bg">
                    帐号
                </td>
                <td class="boxtit">
                    <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtName" ErrorMessage="*帐号不能为空" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="bg">
                    真名
                </td>
                <td class="boxtit">
                    <asp:TextBox ID="txtRealName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtRealName"
                        ErrorMessage="*真名不能为空" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="bg">
                    密码
                </td>
                <td class="boxtit">
                   <asp:TextBox ID="txtPassword"  TextMode="Password" runat="server"></asp:TextBox>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtPassword" ErrorMessage="*密码不能为空" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="bg">
                    游戏房间过滤
                </td>
                <td class="boxtit">
                    <asp:TextBox multinumber  ID="txtRoom" runat="server"></asp:TextBox>
                </td>
            </tr>
             <tr>
                <td class="bg">
                    地区过滤
                </td>
                <td class="boxtit">
                    <select id="slProvince" name="slProvince">
                    </select>
                    <select  style=" width:70px;"  id="slCity" name="slCity">
                    </select>
                </td>
            </tr>
            <tr>
                <td class="bg">
                    推广页面注册过滤
                </td>
                <td class="boxtit">
                    <asp:DropDownList ID="drpFromPage"  runat="server" >
                        <asp:ListItem Text="全部" Value="全部"></asp:ListItem>
                        <asp:ListItem Text="Index.aspx" Value="Index.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index1.aspx" Value="Index1.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index2.aspx" Value="Index2.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index3.aspx" Value="Index3.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index4.aspx" Value="Index4.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index5.aspx" Value="Index5.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index6.aspx" Value="Index6.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index7.aspx" Value="Index7.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index8.aspx" Value="Index8.aspx"></asp:ListItem>
                        <asp:ListItem Text="Index9.aspx" Value="Index9.aspx"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
              <tr>
                <td class="bg">
                    角色
                </td>
                <input  type="hidden" runat="server" id="hidSelectRoles" name="hidSelectRoles" value=""/>
                <td class="boxtit">
                    <table style="  text-align:center">
                        <tr>
                            <td runat="server" id="tdSelect" style=" width:150px;height:150px" >
                                
                            </td>
                            <td style=" width:50px; text-align:center">
                                <ul style="list-style: none outside none;">
                                    <li>
                                        <input type="button" class="buttoncss" id="removeRole" value=">>" />
                                    </li>
                                    <li>
                                        <input type="button" class="buttoncss" id="addRole" value="<<" />
                                    </li>
                                </ul>
                            </td>
                          <td runat="server" id="tdNoSelect" style=" width:150px; height:100%">
                               
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            

            <tr>
                <td class="bg">
                </td>
                <td>
                    <ul class="abtn">
                        <li>
                            <asp:Button runat="server" ID="btnSave" Text="保存" CssClass="buttoncss" OnClick="Save" /></li>
                            <li>
                            <asp:Button runat="server" ID="btnReturn" Text="返回" CausesValidation="False" CssClass="buttoncss" OnClick="CancelSave" /></li>
                    </ul>
                </td>
            </tr>
        </tbody>
    </table>
</asp:Content>
